package Gui;
import javax.swing.tree.*;
//ExtendedTreeNode class extends DefaultMutableTreeNode, a default class of
//MutableTreeNode interface in order to add the node category support.
public class ExtendedTreeNode extends DefaultMutableTreeNode {
    
    private int category;
    public static int TEST_CATEGORY = 0;
    public static int PROBLEM_CATEGORY = 1;
    public static int QUESTION_CATEGORY = 2;
    public static int FREE_ANSWER_CATEGORY = 3;
    public static int TEST_ANSWER_CATEGORY = 4;
    
    public ExtendedTreeNode() {
    }
    
    public ExtendedTreeNode(String name) {
        super(name);
    }
    
    public ExtendedTreeNode(String name,int category) {
        super(name);
        this.category = category;
    }
    
    public void setNodeCategory(int category) {
        this.category = category;
    }
    
    public int getNodeCategory() {
        return category;
    }
}